module.exports = {
  publicPath: './',
  productionSourceMap: false,
  lintOnSave: false,
  devServer: {
    host: '0.0.0.0',
    port: 8888,
    https: false,
    hotOnly: false,
    before: app => {},
    proxy: {
      '/api': {
        target: 'http://localhost:8080',
        ws: true,
        changeOrigin: true,
        pathRewrite: {
          '^/api': ''
        }
      }
    }
  },
  // 配置打包后html的title
  chainWebpack: config => {
    config
      .plugin('html')
      .tap(args => {
        args[0].title = 'GraphVis开发组件'
        return args
      })
  }
}
